package zb.thr1;

import java.util.concurrent.TimeUnit;

/**
 * @author wzby
 * @Date: 2022/8/8 10:05
 */
public class Demo {
    public static void main(String[] args) {
        try {
            TimeUnit.SECONDS.sleep(2);
        }catch (Exception e){
            e.printStackTrace();
        }

        T1 t1 = new T1();
        // 实例化线程类
        t1.setName("@1线程");
        //设置当前线程类的名称
        t1.start();
        //启动线程(线程进入就绪状态)

        T2 t2 = new T2();
        t2.setName("@2线程");
        t2.start();
    }
}
